package com.hxkj.controller;

import com.github.pagehelper.PageInfo;
import com.hxkj.domain.po.LastestMessage;
import com.hxkj.domain.po.Message;
import com.hxkj.domain.po.UserFeedback;
import com.hxkj.domain.vo.MessageVO;
import com.hxkj.service.MessageService;
import com.hxkj.service.UserFeedbackService;
import com.platform.common.domain.to.PageTo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.concurrent.Callable;

@RestController
@RequestMapping(value = "/userFeedback")
public class UserFeedbackController {

    @Autowired
    private UserFeedbackService userFeedbackService;

    @RequestMapping(value = "/getList")
    public Callable<PageInfo<UserFeedback>> getList(@ModelAttribute UserFeedback userFeedback, @ModelAttribute PageTo pageParams) throws Exception{
        return () -> userFeedbackService.getList(userFeedback,pageParams);
    }

    @RequestMapping(value = "/save")
    public void save(@ModelAttribute UserFeedback userFeedback) throws Exception{
        userFeedbackService.save(userFeedback);
    }

}
